dnl
dnl hidrd/usage/id_desc_list.h template.
dnl
dnl Copyright (C) 2010 Nikolai Kondrashov
dnl
dnl This file is part of hidrd.
dnl
dnl Hidrd is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl Hidrd is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with hidrd; if not, write to the Free Software
dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
dnl
include(`m4/hidrd/util.m4')dnl
dnl
`/*
 * vim:nomodifiable
 *
 * ***************** DO NOT EDIT *******************
 * This file is autogenerated from id_desc_list.h.m4
 * *************************************************
 */
/** @file
 * @brief HID report descriptor - usage ID description lists
 *
 * Copyright (C) 2010 Nikolai Kondrashov
 *
 * This file is part of hidrd.
 *
 * Hidrd is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Hidrd is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with hidrd; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 * @author Nikolai Kondrashov <spbnick@gmail.com>
 */

#ifndef __HIDRD_USAGE_ID_DESC_LIST_H__
#define __HIDRD_USAGE_ID_DESC_LIST_H__

#include <stddef.h>
#include "hidrd/cfg.h"
#include "hidrd/usage/id_desc.h"

#ifdef __cplusplus
extern "C" {
#endif

extern bool hidrd_usage_id_desc_list_valid(const hidrd_usage_id_desc *list,
                                           size_t                     num);

extern const hidrd_usage_id_desc *hidrd_usage_id_desc_list_lkp_by_value(
                                        const hidrd_usage_id_desc  *list,
                                        size_t                      num,
                                        hidrd_usage_id              value);

#ifdef HIDRD_WITH_TOKENS
extern const hidrd_usage_id_desc *hidrd_usage_id_desc_list_lkp_by_token(
                                        const hidrd_usage_id_desc  *list,
                                        size_t                      num,
                                        const char                 *token);
#endif

/** Undefined page ID list */
extern const hidrd_usage_id_desc    hidrd_usage_id_desc_list_undefined[1];
'dnl
pushdef(`PAGE',
`/** capitalize_first($3) page ID list */
extern const hidrd_usage_id_desc    dnl
hidrd_usage_id_desc_list_`'lowercase($2)[PAGE_ID_NUM(`$2')];
')
include(`db/usage/page.m4')dnl
popdef(`PAGE')dnl
`
#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /* __HIDRD_USAGE_ID_DESC_LIST_H__ */
'dnl
